#include <stdio.h>
#include <math.h>
int main()
{
    int a, b, num1, num2, temp;
    printf("input a&b:");
    scanf("%d %d", &num1, &num2);
    if (num1 > num2)
    {
        temp = num1;
        num1 = num2;
        num2 = temp;
    }
    a = num1;
    b = num2;
    while (b != 0)
    {
        temp = a % b;
        a = b;
        b = temp;
        /* code */
    }
    printf(" the GCD of %d and %d is: %d\n", num1, num2, a);
    printf(" the LCM of them is:%d\n", num1* num2 / a);
}